package com.xcc.annotation.tx.mysql;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

@Component
public class UserDao {

    @Autowired
    JdbcTemplate jdbcTemplate;

    public void insert(String name,int num,int age){
        String sql = "INSERT INTO `user`(`NAME`,num,age) VALUES(?,?,?)";
        jdbcTemplate.update(sql, name, num, age);
    }

}
